Skip to content

Conversation

@soapun
Copy link
Contributor

@soapun soapun commented Nov 18, 2025

@soapun soapun requested a review from eyurtsev as a code owner November 18, 2025 16:16
@github-actions github-actions bot added fix core Related to the package `langchain-core` and removed fix labels Nov 18, 2025
@codspeed-hq
Copy link

codspeed-hq bot commented Nov 18, 2025

CodSpeed Performance Report

Merging #34006 will not alter performance

Comparing soapun:fix/pydantic-format-error-with-ensureascii (8006b87) with master (cbaea35)1

⚠️ Unknown Walltime execution environment detected

Using the Walltime instrument on standard Hosted Runners will lead to inconsistent data.

For the most accurate results, we recommend using CodSpeed Macro Runners: bare-metal machines fine-tuned for performance measurement consistency.

Summary

✅ 13 untouched
⏩ 21 skipped2

Footnotes

  1. No successful run was found on master (2ba3ce8) during the generation of this report, so cbaea35 was used instead as the comparison base. There might be some changes unrelated to this pull request in this report.

  2. 21 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

@mdrxy mdrxy requested a review from Copilot November 24, 2025 01:01
@mdrxy mdrxy changed the title fix(core): ensure_ascii=False in PydanticOutputParser exception formatting fix(core): ensure_ascii=False in PydanticOutputParser exception formatting Nov 24, 2025
@github-actions github-actions bot added fix and removed fix labels Nov 24, 2025
Copilot finished reviewing on behalf of mdrxy November 24, 2025 01:03
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes a Unicode handling issue in PydanticOutputParser by adding ensure_ascii=False to the json.dumps() call in the _parser_exception method. This ensures that error messages containing non-ASCII characters (e.g., Chinese, Japanese, Arabic, etc.) are displayed correctly instead of being escaped to ASCII sequences like \uXXXX.

Key changes:

  • Modified _parser_exception method in PydanticOutputParser to preserve Unicode characters in exception messages

@mdrxy mdrxy merged commit 01573c1 into langchain-ai:master Nov 24, 2025
88 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core Related to the package `langchain-core` fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

PydanticOutputParser formats error with ensure_ascii=True

2 participants